The invention is directed toward the field of scriptors and interpreters, and more particularly to a scriptor and an interpreter that check both syntax and whether values for variables have been recited/used consistently throughout the script.
A script is a sequence of commands that are to be interpreted, i.e., executed by a program running on a processor, as contrasted with a program that is compiled into machine code of a processor and then directly executed by the processor. Such a programmed processor that interprets a script is typically referred to as an interpreter. A script can be generated using a text editor. As an alternative, it is known to provide a graphical user interface (GUI) that permits a user to write a script by assembling commands and their arguments from pull-down menus. Such a GUI for scripting is typically referred to as a scriptor.
Scriptors and interpreters that check the syntax of the commands are known. Such syntax checking is limited to (1) verifying that command is a valid command, and (2) confirming that a required argument for the command is present.
As an example, a script written in the Wireless Automation Manager Interface Language (WAMIL), that is the subject of a co-pending application, will be considered after a general discussion concerning wireless technology. The general discussion of wireless technology is presented to ensure and appreciation of the context of this script, and others, that will follow.
Large systems often include monitoring systems that permit one or more users to monitor the performance of the system in general, and to specifically monitor the state of one or more parameters of the large system. In some instances, the manner in which the monitoring system delivers information to the user can be a burden.
An example of the large system discussed above is a wireless communication network that provides wireless communications service to a wireless unit that is situated within a geographic region. A Mobile Switching Center (MSC) is responsible for, among other things, establishing and maintaining calls between wireless units and calls between a wireless unit and a wireline unit. As such, the MSC interconnects the wireless units within its geographic region with a public switched telephone network (PSTN). The geographic area serviced by the MSC is divided into spatially distinct areas called xe2x80x9ccells.xe2x80x9d In a schematic block diagram, each cell could be schematically represented by one hexagon in a honeycomb pattern. But, in practice, each cell has an irregular shape that depends on the topography of the terrain surrounding the cell. Typically, each cell contains a base station, which comprises the radios and antennas that the base station uses to communicate with the wireless units in that cell. The base stations also comprise the transmission equipment that the base station uses to communicate with the MSC in the geographic area via communication links. One cell site may sometimes provide coverage for several sectors. Here, cells and sectors are referred to interchangeably.
In a wireless cellular communications system, a base station and a wireless unit communicate voice and/or data over a forward link and a reverse link, wherein the forward link carries communication signals over at least one forward channel from the base station to the wireless unit and the reverse link carries communication signals on at least one reverse channel from the wireless unit to the base station. There are many different schemes for determining how wireless units and base stations communicate in a cellular communications system. For example, wireless communications links between the wireless units and the base stations can be defined according to different radio protocols, including time-division multiple access (TDMA), Frequency Division Multiple Access (FDMA), Code Division Multiple Access (CDMA) and others.
Within the geographic region, the MSC switches a call between base stations in real time as the wireless unit moves between cells, referred to as a handoff. Currently, in FDMA, TDMA, CDMA and GSM, cell site planning to determine the geographic coverage for a cell is a manually intensive task that needs constant adjustment. In planning a cell, the topology of the geographic area and a suitable antenna site is selected based on availability and zoning rules. Such a selection is typically not optimal but adequate. Drive tests and manually collecting signaling data are then performed mostly on the perimeter of the coverage area. Transmit and receive antennas and power are then adjusted in a manually iterative manner to improve the call quality. Sometimes, frequencies are swapped with neighbor cells and/or transmit power is readjusted to improve the coverage. Over time, the cell site engineers review customer complaints and cell site dropped call reports and again try to manually optimize the RF performance.
Lucent Technologies Inc. has developed a monitoring system that a user can use to change parameters of the wireless communication system as well as to extract data about it. This monitoring system can generate the TIpdunix (TI) interface, the Status Display Page (SDP) interface and/or the AUTOPLEX Recent Change and Verification Database (APXRCV) interface. These interfaces can be used individually. But typically, information extracted from one of the interfaces is used to make a decision to use a second one of the interfaces in one way or another. To use an interface, a user must start a discrete process. In a windows-based enviroment, each interface session has its own window.
Example Script No. 1 follows.
In line 2, the variable CELL is set to value 123. Embedded in line 5 is the operations command, op, of the known Tipdunix Interface (TI). The complete embedded command is op:cell 101, BBA 8. It operates on cell 101. But this is different than the value to which the global variable CELL was set in line 2 (namely the value 123). A known scriptor or interpreter would not consider this to be a bug/error in a script. Because this is merely an operations command that retrieves status information, the discrepancy between the value of cell in line 2 and cell identified in line 5 is harmless.
But if the embeded command in line 5 had been a diagnostics command, dgn, this could potentially be a very big problem. No calls can be carried by a cell during the diagnostics procedure. Plus, once diagnostics are initiated, a cell refuses to carry new calls. And, the actual testing procedures cannot begin until all calls (existing at the time that the diagnostics was requested) terminate. The lengths of time it takes for such calls to end varies depending upon the nature of the conversation taking place in those calls. Only after the diagnostics is over can the cell take new calls again.
Line 2 of Script No. 1 indicates that the cell intended to be operated upon is 123. But line 5 inconsistently operates upon a different cell, namely 101. If a person made plans to perform diagnostics on cell 123, then many users would be upset and/or inconvenienced if diagnostics were performed inadvertently on cell 101.
Known scriptors and interpreters cannot identify such inconsistent setting of variable value. Unfortunately, such inconsistencies within a script are relatively common, especially where the script is lengthy or where a user has edited an existing script without realizing the need to propagate his change throughout the script.
Scripting languages and their use are not exclusive to wireless technology. Suppose a script was written in an appropriate language for the banking industry. An analogous error to that discussed above concerning Script No. 1 would be if line 2 set the value for the variable ACCOUNT to 567 while line 5 transferred money into account 568. The owner of account 568 might be happy, but the owner of account 567 (who was the intended recipient of the transfer, as evidenced by line 2) would be upset at the least.
The invention is, in part, a recognition of the need to check not only the syntax of commands in a script, but also the need to check for the consistent use of variables throughout a script. The invention, among other things, solves the problems identified by the inventor to exist in the Background Art.
The invention, in part, provides a method (and the associated program and programmed device) for processing an at least partially-completed script having at least one command, wherein the method checks syntax and argument consistency. Such a method comprises: a) providing a current command to be evaluated from the script, the command having a current argument; b) generating an ideal command from a set of permissible commands, the ideal command having a ideal argument that is consistent with preexisting values of variables identified in the script; c) comparing the current command against the ideal command; d) returning, if the step c) results in a match, to the step a) using a second command from the script; and e) repeating, if the step c) does not result in a match, the steps b) and c) for additional ideal commands until a match is found or until the set of permissible commands has been exhausted. Also, such a method can additionally include: f) returning, if a match is found via the step e), to the step a) using a second command from the script.
The invention also, in part, provides a method (and the associated program and apparatus) of editing a script having a sequence of commands. Such a method comprises: a) providing a script; b) selecting a command to be edited from the script, the selected command having an associated argument that sets the value of a variable; c) updating the associated argument of the selected command to change the value of the variable; wherein the script includes a second command that has a defined argument that corresponds to the variable but that which does not equal the updated value of the variable; and d) regenerating the script to update the defined argument to equal the updated value of the variable.
The invention also, in part, provides, a method (and the associated program and apparatus) of interpreting each command in a script having a sequence thereof written in a high-level scripting language, wherein the method checks syntax and argument consistency. Such a method comprises: a) providing a current command to be evaluated from the script, the command having a current argument; b) generating an ideal command from a set of permissible commands, the ideal command having a ideal argument that is consistent with preexisting values of variables identified in the script; c) comparing the current command against the ideal command; d) executing, if the step c) results in a match, the current command; e) returning, if the step c) results in a match, to the step a) using a second command from the script; f) repeating, if the step c) does not result in a match, the steps b) and c) for additional ideal commands until a match is found or until the set of permissible commands has been exhausted; and g) executing, if a match is found via the step f), the current command. Such a method can also include: h) returning, if a match is found via the step f), to the step a) using a second command from the script.
The foregoing and other objectives of the present invention will become more apparent from the detailed description given hereinafter. However, it should be understood that the detailed description and specific examples, while indicating preferred embodiments of the invention, are given by way of illustration only, since various changes and modifications within the spirit and scope of the invention will become apparent to those skilled in the art from this detailed description.